﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace erse253_homework
{
    public class PointxyV
    {
        public int i;
        public int j;
        public double V;
        public double distance;

        public PointxyV(int i, int j, double V, int x, int y)
        {
            this.i = i;
            this.j = j;
            this.V = V;
            Distance(x, y);
        }


        public PointxyV()
        {
            this.i = 0;
            this.j = 0;
            this.V = 0;
           
        }
        public void Distance(int i, int j)
        {
            distance = Math.Pow(Math.Pow(this.i - i, 2) + Math.Pow(this.j - j, 2), 0.5);

        }

        public void UpdateDistance(int i, int j) 
        {
            distance = Math.Pow(Math.Pow((this.i - i), 2) + Math.Pow((this.j - j), 2), 0.5);
        }
    }
}
